<template>
    <div class="">
        <div class="pr10">
            <div class="analyItem">
                <p class="analyItemTit tx-center">状态</p>
                <div class="analyItemCon">

                </div>
            </div>
        </div>
        <div class="thinScroll pr10" v-scrollHeight="10">
            <router-link tag="div" :to="{path: routerPath('editThree'),query: {id: 2}}" class="analyItem anItemBor"
                active-class="anItemBor-active">
                <p class="analyItemTit tx-center">服务</p>
                <div class="analyItemCon">
                    <div class="col-md-10">
                    </div>
                </div>
            </router-link>
        </div>
    </div>
</template>
<script>
import {
    mapGetters
} from 'vuex'
import {
    GetByUIdFundInformation,
    selectAllCityAndCompany
} from '../Resources/Api'
export default {
    data () {
        return {
            capital: {},
            region: ''
        }
    },
    created () {
        this.selectAllCityAndCompanyFn()
    },
    methods: {
        // 路由跳转路径拼接
        routerPath (path) {
            return this.$route.matched[1].path + '/' + path
        },
        // 直接进行路由跳转路径
        routerPush (path) {
            this.$router.push(this.$route.matched[1].path + '/' + path)
        },
        // 查询指定人员资金板块奖罚数据
        GetByUIdFundInformationFn () {
            let _this = this
            _this.capital = {}
            GetByUIdFundInformation({
                uid: _this.leftInfo.uid,
                area: _this.region
            }).then(results => {
                _this.capital = results.data.Body
            }).catch(error => {
                console.log(error)
            })
        },
        // 通过分司ID去除相同等级地区
        selectAllCityAndCompanyFn () {
            let _this = this
            _this.region = ''
            selectAllCityAndCompany({
                companyId: _this.leftInfo.dq_id
            }).then(results => {
                for (let i = 0; i < results.data.length; i++) {
                    _this.region = _this.region + results.data[i].cpId + ','
                }
                _this.region = _this.region.substr(0, _this.region.length - 1)
                _this.GetByUIdFundInformationFn()
            }).catch(error => {
                console.log(error)
            })
        }
    },
    computed: {
        ...mapGetters(['leftInfo'])
    },
    watch: {
        leftInfo () {

        }
    }
}

</script>
<style>
    .cRednew {
        background: red;
        padding: 2px;
        color: #fff;
    }

</style>
